package com.cosytek.farmmanager;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

/**
 * Created by Happy on 2015/3/25.
 */
public class UIHelper {

    public static  void promptError(Context c, ServerError error) {
        AlertDialog.Builder db = new AlertDialog.Builder(c);
        db.setTitle(R.string.dlg_error_title);
        db.setMessage(error.getMsg());
        db.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        db.create().show();
    }

}
